package com.wtwd.device.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wtwd.device.model.entity.SysRole;
import com.wtwd.device.model.vo.RolePermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;


/**
 * @author ljiong
 * @date 2021/08/03
 * @description
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> getAllSysRoleList();

    List<RolePermissionVo> getRolePermission(@Param("fatherRoleId") Long fatherRoleId,@Param("subRoleId")Long subRoleId);

    SysRole getSysRoleByRoleId(@Param("roleId") Long roleId);

    List<SysRole> getSysRoleByRoleTypeList(@Param("list") ArrayList<Integer> roleTypeList);

    Integer bathAddRoleType(@Param("list") ArrayList<SysRole> bathAddSysRole);

    SysRole getSysRoleByRoleType(@Param("roleType") Integer roleType);
}
